package com.runjian.rundo.iot.agent.iec104.action;

import com.runjian.rundo.iot.agent.common.message.DeviceMessage;
import com.runjian.rundo.iot.agent.iec104.consts.Action;
import com.runjian.rundo.iot.agent.iec104.session.Iec104TcpClientDeviceSession;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
 * 动作执行器
 * 
 * @author CaoQingHua
 */
@AllArgsConstructor
@Getter
@Setter
public abstract class AbstractActionHandle {

    public abstract Action getAction();

    /**
     * 执行的动作
     * 
     * @param iec104DeviceSession 连接的Session
     */
    public void handle(DeviceMessage deviceMessage, Iec104TcpClientDeviceSession iec104DeviceSession) {

    }

    /**
     * 取消动作
     *
     * @param iec104DeviceSession 连接的Session
     */
    public void cancel(Iec104TcpClientDeviceSession iec104DeviceSession) {

    }
}
